package com.sino.operation.controller;

import com.sino.operation.config.persistence.MyPersistence;
import com.sino.operation.entity.BizHint;
import com.sino.operation.entity.SysCenter;
import com.sino.operation.entity.SysTeller;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.ArrayList;
import java.util.List;
import java.util.UUID;

/**
 * @Title: Test2Controller
 * @Description:
 * @Author dengls
 * @date 2021/10/12 18:06
 */
@RestController
public class Test2Controller {
    @Autowired
    MyPersistence myPersistence;

    @RequestMapping("/test2")
    public void xx() {
        SysTeller x = new SysTeller();
        x.setId(null);
        x.setTellerName("xx");
        BizHint y = new BizHint();
        y.setId("111");
        y.setMessage("ww");
        List<Object> listIn = new ArrayList<>();
        listIn.add(x);
        listIn.add(y);
        List<Object> listOut = new ArrayList<>();
        SysCenter z = new SysCenter();
        z.setCenterNo("111111");
        z.setCenterName("zzz");
        listOut.add(z);
        listOut.add(listIn);
        myPersistence.save(listOut);
    }
}
